<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ref响应数据</title>
</head>
<body>
<script type="module">
    import { createApp, ref } from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js'

    const app = createApp({
        setup: function () {
            const count = ref(0);
           function addCount() {
               count.value++;
           }
            return {
                count,
                addCount
            }
        }
    }).mount("#app")


</script>
<div id="app">
    <div>{{count}}</div>
    <button @click="addCount()">add++</button>
</div>
</body>
</html>